<template>
  <div class="table">
    <slot></slot>
  </div>
</template>

<script>
import IuleTableItem from './iule-table-item'
export default {
  name: 'iule-table',
  props: {
    columns: {
      type: Array,
      default: () => {
        return []
      }
    },
    data: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  created () {
    if (this.data) {
      this.$store.dispatch('setDataList', this.data)
    }
  },
  components: {
    IuleTableItem
  }
}
</script>

<style scoped>
  .table {
    width: 100%;
    font-size: 0.39rem;
    color: rgba(51,51,51,1);
    display: flex;
    justify-content: space-around;
  }
</style>
